Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: support to_ecto(%Ecto.Changeset{}) and from_ecto(%Ecto.C… #395

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

27medkamal
Copy link
Contributor

Currently if you try
%MyApp.AshResource{} |> Ecto.Changeset.change() |> MyApp.Repo.insert!()

It fails due to Ecto not knowing about %Ash.NotLoaded{} and the fact that to_ecto currently only works on ash resources.

This PR supports changesets in to_ecto
Also added support in from_ecto for completeness

Contributor checklist

There are currently no tests for to_ecto or from_ecto, hence the lack of tests from this PR.

  • Bug fixes include regression tests
  • Features include unit/acceptance tests

@zachdaniel zachdaniel merged commit af32acd into ash-project:main Oct 1, 2024
45 of 48 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants